;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Use of this sample source code is subject to the terms of the Microsoft
; license agreement under which you licensed this sample source code. If
; you did not accept the terms of the license agreement, you are not
; authorized to use this sample source code. For the terms of the license,
; please see the license agreement between you and Microsoft or, if applicable,
; see the LICENSE.RTF on your install media or the root of your tools installation.
; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
;
;
; (C) Copyright 2006 Marvell International Ltd.
; All Rights Reserved
;
; Memory Map
; ----------
;*****************************************************************************
;*     RAM Layout: Nand boot; non IU
;*     ------------------------------
;*      --------------------------------------> 8400_0000 
;*      |        Display for ULDR UI    |                 --------------------------------------> 83D0_0000
;*      --------------------------------------> 83CC_7000 |        EBT RAMIMAGE (1MB)    |
;*      |                               |                 --------------------------------------> 83C0_0000
;*      |        MVED                   |                 |        EBT/IPL Stack (1MB)   |
;*      |                               |                 --------------------------------------> 83B0_0000
;*      --------------------------------|                 |        EBT/IPL RAM (1MB-16KB)   |
;*      |                               |                 --------------------------------------> 83A0_4000
;*      |                               |                 |        EBT Pagetables (16KB)  |
;*      |                               |                 --------------------------------------> 83A0_0000
;*      |                               |                 |        IPL RAMIMAGE (1MB)     |
;*      |                               |                 |                               |
;*      |                               |                 --------------------------------------> 8390_0000
;*      |                               |                 |                               |
;*      |        OS  RAM                |                 --------------------------------------> 
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |                               |
;*      |-------------------------------| *autosize can alter the start
;*      |        NK RAMIMAGE            |
;*      |                               |
;*      --------------------------------------> 8000_1000
;*      |                               |
;*      |        EBT ARGS(4K)           |
;*      --------------------------------------> 8000_0000
;*
;******************************************************************************

MEMORY

; NOTE: if changing MVED address or size without access to source code, add the
; following DWORD registry keys under [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PVRKernel] :
; PHYS_MEM_ADDR & PHYS_MEM_SIZE and set to appropriate values.


;   Name     Start     Size      Type
;   -------  --------  --------  ----
    ARGS     80000000  00001000  RESERVED
    NK       80001000  02000000  RAMIMAGE
IF BSP_DDR128MB
    RAM      82001000  054FE000  RAM
    MVED     874FF000  00800000  RESERVED    ; Must be in sync with image_cfg.h and memory.cfg.xml (also see note above)
    DISPLAY  87CFF000  00301000  RESERVED    ; Must be in sync with image_cfg.h and memory.cfg.xml!
ELSE
    RAM      82001000  014FE000  RAM
    MVED     834FF000  00800000  RESERVED    ; Must be in sync with image_cfg.h and memory.cfg.xml! (also see note above)
    DISPLAY  83CFF000  00301000  RESERVED    ; Must be in sync with image_cfg.h and memory.cfg.xml!
ENDIF
IF IMGULDR
    cbNKPagingPoolSize 00000000 00100000 FIXUPVAR
ENDIF

CONFIG

    AUTOSIZE=ON
    KERNELFIXUPS=ON
    COMPRESSION=ON
    FSRAMPERCENT=0x0A0A0A0A

IF IMGPROFILER   
    PROFILE=ON
ELSE
    PROFILE=OFF
ENDIF

;
; ROMFLAGS is a bitmask of options for the kernel
;   ROMFLAGS    0x0001      Disallow Paging
;   ROMFLAGS    0x0002      Not all KMode
;   ROMFLAGS    0x0010      Trust Module only
;
IF IMGTRUSTROMONLY
    IF IMGNOTALLKMODE
       ROMFLAGS=12
    ELSE
       ROMFLAGS=10
    ENDIF
ELSE
    IF IMGNOTALLKMODE
       ROMFLAGS=02
    ELSE
       ROMFLAGS=00
    ENDIF
ENDIF

;
; NOR nbo
;
;ROMSTART=97C00000

; ram image .nb0
ROMSTART=80001000

; From memory.cfg.xml
; NAND flash size
; Totals should add up to total NAND - reserved
; (From memory.cfg.xml - 0x03F90000)
IF IMGULDR
; Give ULDR less ROM
    ROMSIZE=00590000
ELSE
; Give OS rest of space.
    ROMSIZE=03A00000
ENDIF IMGULDR

; NB0 file should contain image
ROMWIDTH=32

